package personal.wang.summary;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @className: RecordSummary
 * @Description:
 * @Author: wangyifei
 * @Date: 2022/6/26 9:29
 */
public abstract class RecordSummary {
    private static final Logger logger = LoggerFactory.getLogger(RecordSummary.class);
    protected Long succSum = new Long(0);
    protected Long failSum = new Long(0);

    public Long getSuccSum() {
        return succSum;
    }

    public void setSuccSum(Long succSum) {
        this.succSum = succSum;
    }

    public Long getFailSum() {
        return failSum;
    }

    public void setFailSum(Long failSum) {
        this.failSum = failSum;
    }
    public abstract void record(boolean succ , int d);
    public String getSummary(String taskName , String backupPath){
        return String.format("test report : 测试任务[%s] 共发送 %s 条数据，其中成功 %s 条 ， 失败 %s , 数据保存在 %s 目录下"
                , taskName
                , succSum + failSum
                , succSum
                , failSum
                ,backupPath
        );
    }
}
